﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp4
{
    public class Enemy
    {
        string id;
        int hp=100;
        int lv=1;
        //父类属性
        public string ID { set; get; }
        public int HP { set; get; }
        public int LV { set; get; }
        //有参构造函数
        public Enemy(string n)
        {
            ID = n;
        }
        //父类普通方法
        public void Speak()
        {
            Console.WriteLine("此路是我开，哪里走！");
        }
        //父类虚方法
        public virtual void Attrack()
        {
            Console.WriteLine("我发起了普通攻击");
        }
    }
}
